package com.weiiew.itemservice.controller;

import com.weiiew.common.OnlyFeign.OnlyFeign;
import com.weiiew.itemservice.service.ItemServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description
 * @Author 魏锴
 * @Date 2025/4/3
 */
@OnlyFeign
@RestController
@RequestMapping("/item/feign")
@RequiredArgsConstructor
public class ItemFegnController {
    private final ItemServiceImpl itemService;


    @RequestMapping("/recipe/map")
    Map<Integer, Integer> getItemRecipeMap(@RequestParam("version") int version){
        return itemService.getItemRecipeMap(version);
    }
    @RequestMapping("/name/map")
    Map<Integer, String> getIdNameMap(@RequestParam("version") int version){
        return itemService.getIdNameMap(version);
    }

}
